A Database is a collection of interrelated data items, stored once and
organized in a form for easy retrieval.
Store and control large amounts of data
If properly designed it provides a consistent view of the data
All entities have a relationship between them
Why use a database?
Reduces programming effort
Easier to create and modify data (compared to individual files)
Only need to update one location - one copy of all information
What is a database management system (DBMS)?
Provides a method of storing and using data in a database
"Nothing more than a computerized data-keeping system"
Several types that can be used on z/OS: inverted list, hierarchic, network, and relational
Why are DBMS useful?
A database stores the data only once in one place and makes it
available to all application programs and users.
Data can also be backed up and recovered more easily in a
single database than in a collection of flat files.
Databases provide security by limiting access to data. The ability
to read, write, update, insert, or delete data can be restricted.
Database structures offer multiple strategies for data retrieval
(sequentially or go directly to the desired data).
Finally, an update performed on part of the database is
immediately available to other applications. Because the data
exists in only one place, data integrity is more easily ensured.
The role of a DBMS is to provide:
Enable concurrent access (I.e. multiple users,
multiple applications) to a single copy of the data
Control concurrent access via a locking
mechanism with ACID properties (ACID is an
acronym for atomicity, consistency, isolation, and
durability) so as to maintain integrity for all
updates
Reduce data redundancy by maintaining only one
copy of the data
Automated rollback, restart and recovery
ACID
Atomicity - the transaction must execute completely, or
not at all
Consistency - Resources must remain consistent (ex.
Same amount of money debited and credited)
Isolation - each transaction must appear to occur before
or after any other transaction
Durability - If the transaction completes successfully, the
state (changes due to the transaction) will survive any
future failures
What is the role of a DBA (Database Administrator)
Provides standards for databases
Determines rules for accessing data and monitors its security
Approves the use of any programs that access production databases
Controls database integrity & availability; monitors activities for backup and recover
Guides, reviews and approves database designs
What is DB2?
Short for database 2
A relational database produced in 1982 by IBM, was one of the first dbms to use sql
Relational database has no or little redundancy in data so it can efficiently store large volumes of data
Significantly slower than ims or idms databases
What Is IMS (Information Management System)
A hierarchal database produced by IBM in 1972
Originally designed for the Apollo space program
Hierarchal system contains redundancy in data but is extremely fast
What Is IDMS
Uses a network style architecture similar to hierarchal but is slightly more flexible
Database Comparison
Hierarchical vs. Relational Databases
Hierarchical
Storage:
-Parent/Child Relationship
-Less Redundant Data
-Data Duplication
Example:
Data Structure:
-Data Connected in Tiers
-Each tier’s next level up is its parent
-That tier is the next tier’s child
Relational:
Storage:
-Data stored within tables
-Table consists of records and fields
-Records: rows or ‘tuples’
-Fields: columns or ‘attributes’
-Tables are ‘related’ to each other
-Relationships are shown using key constraints
Example:
-Much data duplication on databases in lower normal forms
Differences between Hierarchy vs. Relational Database:
-Operational Data(Relational):
-Analytical Data(Hierarchy):
Example including Object Oriented Programming:
- Basically a Venn Diagram of using: Relational, Hierarchical, and Object Oriented.
Differences with using Relational, Hierarchical, and Object Oriented:
Price/Benefit Analysis:
Hierarchical: Uses design and application logic.
-Price: Hierarchical has a longer development cycle than other 2
-Benefit: Hierarchical has better performance
Example:
Relational: Uses ‘SQL’ for navigation run time.
-Price: Price based on performance
-Benefit: Short and to the point dev cycle
Example:
Object Oriented: Uses method calling to navigate database.
-Price: Development is easier
-Benefit: Constant reuse of methods
Example:
Hierarchical (IMS):
– Data is relatively static (can not just "add a column")
– Navigational : need to know the structure to get to the data
– Faster & more efficient - once Segment Search Arguments (SSAs) are coded
Relational(DB2):
– Changeable info
– Change in structure : no impact on existing application
– Non-Navigational : no need to know the structure right data (just tablename and columnname(s))
Benefits Of Database On A Mainframe
All data is kept on one system limiting io time
Benefits Of Database On A Distributed System
Easier to manage on small scale projects
What is SQL?
Stands for Structured Query Language
High level language used in programming database
Three categories
DML: data manipulation language - read and modify data
DDL: data definition language - define, change, or drop DB2 objects
DCL: data control language - grant and revoke authorizations
What is a database
organized in a form for easy retrieval.
Why use a database?
What is a database management system (DBMS)?
Why are DBMS useful?
available to all application programs and users.
single database than in a collection of flat files.
to read, write, update, insert, or delete data can be restricted.
(sequentially or go directly to the desired data).
immediately available to other applications. Because the data
exists in only one place, data integrity is more easily ensured.
The role of a DBMS is to provide:
multiple applications) to a single copy of the data
mechanism with ACID properties (ACID is an
acronym for atomicity, consistency, isolation, and
durability) so as to maintain integrity for all
updates
copy of the data
ACID
not at all
Same amount of money debited and credited)
or after any other transaction
state (changes due to the transaction) will survive any
future failures
What is the role of a DBA (Database Administrator)
What is DB2?
What Is IMS (Information Management System)
What Is IDMS
Database Comparison
Hierarchical vs. Relational Databases
Hierarchical
Storage:
-Parent/Child Relationship
-Less Redundant Data
-Data Duplication
Example:
Data Structure:
-Data Connected in Tiers
-Each tier’s next level up is its parent
-That tier is the next tier’s child
Relational:
Storage:
-Data stored within tables
-Table consists of records and fields
-Records: rows or ‘tuples’
-Fields: columns or ‘attributes’
-Tables are ‘related’ to each other
-Relationships are shown using key constraints
Example:
-Much data duplication on databases in lower normal forms
Differences between Hierarchy vs. Relational Database:
-Operational Data(Relational):
-Analytical Data(Hierarchy):
Example including Object Oriented Programming:
- Basically a Venn Diagram of using: Relational, Hierarchical, and Object Oriented.
Differences with using Relational, Hierarchical, and Object Oriented:
Price/Benefit Analysis:
Hierarchical: Uses design and application logic.
-Price: Hierarchical has a longer development cycle than other 2
-Benefit: Hierarchical has better performance
Example:
Relational: Uses ‘SQL’ for navigation run time.
-Price: Price based on performance
-Benefit: Short and to the point dev cycle
Example:
Object Oriented: Uses method calling to navigate database.
-Price: Development is easier
-Benefit: Constant reuse of methods
Example:
Hierarchical (IMS):
– Data is relatively static (can not just "add a column")
– Navigational : need to know the structure to get to the data
– Faster & more efficient - once Segment Search Arguments (SSAs) are coded
Relational(DB2):
– Changeable info
– Change in structure : no impact on existing application
– Non-Navigational : no need to know the structure right data (just tablename and columnname(s))
Benefits Of Database On A Mainframe
Benefits Of Database On A Distributed System
What is SQL?